<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var i,k,count;
        i = Number(prompt('请输入一个数来以内他的所有因数'))
        k = i;
        while(k > 0){
            if(i%k == 0){
                document.write(k+"  ");
            }
            k--;    
        }
    </script>
</body>
</html>